home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20041116-20060924
/
000333_rock_spambust_violin@yahoo.com_Fri May 5 10:48:18 2006.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Path: newsmaster.cc.columbia.edu!newsfeed.nyu.edu!news.maxwell.syr.edu!postnews.google.com!v46g2000cwv.googlegroups.com!not-for-mail
From: "tomviolin" <rock_spambust_violin@yahoo.com>
Newsgroups: comp.protocols.kermit.misc
Subject: using FILE OPEN quadruples memory usage!
Date: 4 May 2006 15:53:51 -0700
Organization: http://groups.google.com
Lines: 68
Message-ID: <1146783231.532130.44080@v46g2000cwv.googlegroups.com>
NNTP-Posting-Host: 129.89.149.244
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1146783236 7588 127.0.0.1 (4 May 2006 22:53:56 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 4 May 2006 22:53:56 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: v46g2000cwv.googlegroups.com; posting-host=129.89.149.244;
posting-account=ornCOQwAAAAyCG4a7NOAj_SMr54FiqNu
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15589
I have discovered that using FILE OPEN in C-Kermit 8.0.211 causes
Kermit's memory usage to quadruple. The memory usage does not go back
down after the file(s) are closed, either.
This memory explosion does NOT appear to occur when the "old" OPEN FILE
method is used, only with the "new" FILE OPEN method. So it is
possible to work around it, albeit inconveniently at times.
Further openings of files do not appear to result in further memory
expansion. I was able to have multiple files open using FILE OPEN and
it did not proceed to octuple memory usage, for example.
I'm using Kermit compiled for ARM with "make linuxnc KFLAGS=-DNOBIGBUF"
(I'm trying to save memory!) and running on a 32M embedded board
running the Linux 2.4.26-ts9 kernel.
How can this be happening if FILE OPEN is simply a front-end for the
fopen() system call? I could see memory on the order of kilobytes
being allocated, but we're talking several megabytes of memory being
consumed here, just from opening a text file.
Is there perhaps some Makefile option (along the lines of the
-DNOBIGBUF that I already used) that can mitigate this?
Witness the following test: session one is a Kermit session, and
session 2 is showing the results of ps v -p performed on the Kermit
process at each step.
--- session one ---
$ kermit
C-Kermit 8.0.211, 10 Apr 2004, for Linux
Copyright (C) 1985, 2004,
Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/home/dlogger/) C-Kermit>echo \v(pid)
29009
(/home/dlogger/) C-Kermit>
-- session two --
$ ps v -p 29009
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
29009 pts/1 S 0:00 247 1666 2849 1308 4.5 kermit
$
-- session one --
(/home/dlogger/) C-Kermit>file open \%f .profile
(/home/dlogger/) C-Kermit>
-- session two --
$ ps v -p 29009
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
29009 pts/1 S 0:00 265 1666 6905 5452 18.9 kermit
$
-- session one --
(/home/dlogger/) C-Kermit>file close all
(/home/dlogger/) C-Kermit>
-- session two --
$ ps v -p 29009
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
29009 pts/1 S 0:00 267 1666 6905 5460 19.0 kermit
$
--- end of sessions ---
Note that the memory usage actually went UP even further after the file
was closed!